import java.util.Scanner;

public class TestDemo01 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int count=0;
        int n=scanner.nextInt();
        for(int i=31;i>=0;i--){
            if((1<<i&n)!=0){
                count++;
            }
        }
        System.out.println(count);
    }
}
